#pragma once
void bubbleSort(int* arr, int n) {
	int temp, i, j;
	int flag;
	for (i = n - 1; i >= 1; --i) {
		flag = 0;
		for (j = 1; j <= i; j++) {
			if (arr[j - 1] > arr[j]) {
				temp = arr[j - 1];
				arr[j - 1] = arr[j];
				arr[j] = temp;
				flag = 1;
			}
		}
		if (flag == 0)
			return;
	}
}